﻿using System;
using System.Data.SqlClient;
using System.Web.UI;
using UDS.Components;

namespace UDS.SubModule.UnitiveDocument
{
    /// <summary>
    /// DisplayStaffInfo 的摘要说明。
    /// </summary>
    public partial class DisplayStaffInfoPage : Page
    {
        private int _staffId;

        protected override void OnInit(EventArgs e)
        {
            _staffId = QSUtil.GetPositiveInt32("StaffID");
            if (_staffId > 0)
            {
                var staffInfo = Staff.GetStaffInfo(_staffId);
                if (staffInfo != null)
                {
                    lblRealName.Text = staffInfo.RealName;
                    lblStaff_Name.Text = staffInfo.Name;
                    lblEmail.Text = staffInfo.Email;
                    lblRegistedDate.Text = Utility.FormatDate(staffInfo.TimeRegistered);
                    lblSex.Text = staffInfo.SexStr;
                }
            }
            base.OnInit(e);
        }
    }
}